/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.ly.ocw.web.admin;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ly.ocw.exception.ServerException;
import com.ly.ocw.service.weixin.WeixinPoiService;

/**
 * AdminPoiController
 * 
 * @author peter
 */
@Controller
@RequestMapping(value = "/admin/poi")
public class AdminPoiController {

	private static Logger logger = LoggerFactory.getLogger(AdminPoiController.class);

	@Autowired
	private WeixinPoiService weixinPoiService;

	// to 绑定会员卡页面
	@RequestMapping(method = RequestMethod.GET)
	@ResponseBody
	public String list(Model model) throws ClientProtocolException, IOException, ServerException {
		logger.info("Poi List");
		String resp = weixinPoiService.getPoiList();

		return resp;
	}

}
